## API Report File for "@backstage/plugin-tech-insights-backend-module-jsonfc"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts
import { BackendFeature } from '@backstage/backend-plugin-api';
import { BooleanCheckResult } from '@backstage/plugin-tech-insights-common';
import { CheckResponse } from '@backstage/plugin-tech-insights-common';
import { CheckValidationResponse } from '@backstage/plugin-tech-insights-node';
import { Config } from '@backstage/config';
import { FactChecker } from '@backstage/plugin-tech-insights-node';
import { Logger } from 'winston';
import { Operator } from 'json-rules-engine';
import { TechInsightCheck } from '@backstage/plugin-tech-insights-node';
import { TechInsightCheckRegistry } from '@backstage/plugin-tech-insights-node';
import { TechInsightsStore } from '@backstage/plugin-tech-insights-node';
import { TopLevelCondition } from 'json-rules-engine';

// @public (undocumented)
export type CheckCondition = {
  operator: string;
  fact: string;
  factValue: any;
  factResult: any;
  result: boolean;
};

// @public (undocumented)
export const JSON_RULE_ENGINE_CHECK_TYPE = 'json-rules-engine';

// @public (undocumented)
export interface JsonRuleBooleanCheckResult extends BooleanCheckResult {
  // (undocumented)
  check: JsonRuleCheckResponse;
}

// @public (undocumented)
export interface JsonRuleCheckResponse extends CheckResponse {
  // (undocumented)
  rule: {
    conditions: ResponseTopLevelCondition & {
      priority: number;
    };
  };
}

// @public
export class JsonRulesEngineFactChecker
  implements FactChecker<TechInsightJsonRuleCheck, JsonRuleBooleanCheckResult>
{
  constructor(options: JsonRulesEngineFactCheckerOptions);
  // (undocumented)
  getChecks(): Promise<TechInsightJsonRuleCheck[]>;
  // (undocumented)
  runChecks(
    entity: string,
    checks?: string[],
  ): Promise<JsonRuleBooleanCheckResult[]>;
  // (undocumented)
  validate(check: TechInsightJsonRuleCheck): Promise<CheckValidationResponse>;
}

// @public
export class JsonRulesEngineFactCheckerFactory {
  constructor(options: JsonRulesEngineFactCheckerFactoryOptions);
  // (undocumented)
  construct(repository: TechInsightsStore): JsonRulesEngineFactChecker;
  // (undocumented)
  static fromConfig(
    config: Config,
    options: Omit<JsonRulesEngineFactCheckerFactoryOptions, 'checks'>,
  ): JsonRulesEngineFactCheckerFactory;
}

// @public
export type JsonRulesEngineFactCheckerFactoryOptions = {
  checks: TechInsightJsonRuleCheck[];
  logger: Logger;
  checkRegistry?: TechInsightCheckRegistry<TechInsightJsonRuleCheck>;
  operators?: Operator[];
};

// @public
export type JsonRulesEngineFactCheckerOptions = {
  checks: TechInsightJsonRuleCheck[];
  repository: TechInsightsStore;
  logger: Logger;
  checkRegistry?: TechInsightCheckRegistry<any>;
  operators?: Operator[];
};

// @public (undocumented)
export type ResponseTopLevelCondition =
  | {
      all: CheckCondition[];
    }
  | {
      any: CheckCondition[];
    };

// @public (undocumented)
export type Rule = {
  conditions: TopLevelCondition;
  name?: string;
  priority?: number;
};

// @public (undocumented)
export interface TechInsightJsonRuleCheck extends TechInsightCheck {
  // (undocumented)
  rule: Rule;
}

// @public
const techInsightsModuleJsonRulesEngineFactCheckerFactory: () => BackendFeature;
export default techInsightsModuleJsonRulesEngineFactCheckerFactory;

// (No @packageDocumentation comment for this package)
```
